package com.qf.homeworkssm.vo;

import com.qf.homeworkssm.utils.Contants;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVo {

    private Integer code;

    private String message;

    public ResultVo(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    private String Data;


    public static ResultVo fail(String msg){

        ResultVo resultVo = new ResultVo();

        resultVo.setCode(Contants.FAIL_CODE);
        resultVo.setMessage(msg);

        return resultVo;
    }
}
